//
//  CTCollectionViewColumnLayout.h
//
//  Created by Andney Jack on 2021/6/2.
//

#import <UIKit/UIKit.h>
#import "CTCollectionViewColumnLayoutDefines.h"

@interface CTCollectionViewColumnLayout : UICollectionViewLayout

@property (nonatomic, assign) NSInteger columnCount; // Default: 2
@property (nonatomic, assign) CGFloat columnSpacing; // Default: 10.0
@property (nonatomic, assign) CGFloat interitemSpacing; // Default: 10.0

@property (nonatomic, assign) CGFloat headerHeight; // Default: 0
@property (nonatomic, assign) CGFloat footerHeight; // Default: 0

@property (nonatomic, assign) UIEdgeInsets headerInset; // Default: UIEdgeInsetsZero
@property (nonatomic, assign) UIEdgeInsets footerInset; // Default: UIEdgeInsetsZero
@property (nonatomic, assign) UIEdgeInsets sectionInset; // Default: UIEdgeInsetsZero
@property (nonatomic, assign) CTCollectionViewItemRenderDirection itemRenderDirection; // Default: ShortestFirst
@property (nonatomic, assign) BOOL allowUseSafeAreaInsets; // Default: YES

@property (nonatomic, assign) BOOL sectionHeadersPinToVisibleBounds; // Default: NO
@property (nonatomic, assign) BOOL sectionFootersPinToVisibleBounds; // Default: NO

// The minimum height of the collection view's content.
// This could be used to allow hidden headers with no content.
@property (nonatomic, assign) CGFloat minimumContentHeight;

- (NSInteger)columnCountForSection:(NSInteger)section;
- (CGFloat)contentWidthForSection:(NSInteger)section;
- (CGFloat)itemWidthForSection:(NSInteger)section;

@end
